<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        //【4】【替换】通过string对象的replace方法。
        var string11 = '2017-06-26';
        var today = new Date(string11.replace(/-/g, '.'));
        console.log(today);
        //Mon Jun 26 2017 00:00:00 GMT+0800 (中国标准时间)
    </script>
</body>

</html>